<!doctype html public "-//w3c//dtd html 3.2//en">

<html>
	
	<head>
		<title>
			fMRI Sandbox Howto
		</title>
	</head>
	
	<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
		<h1>
			How to proceed
		</h1>
		
		<h2>
			Load your image files
		</h2>
		<p>
		<a href="buttons_explained.html#load">Load</a>
		 the volume(s) that you would like to process into the viewer. You can load analyze files (.hdr/.img) pairs or 4D image data as a .mat containing an array called idat in the dimension order x,y,z,time.
		 If you want to know more about the file types to load, please refer to <a href="file_format.html">this guide</a>
		</p>
		<p>
		If you want to do statistical analyses, you can set up a model by defining a
		design in the design load section. This will also allow you to load the
		hemodynamic predictors (hemodynamics) either from a .mat file or to load a QNX
		state system file (.dgz). You can also define which parts of a scan contain
		information, and which contain only noise with an intrial matrix (for more information on the intrial matrix, see <a href="file_format.html">the file format information</a>. 
		</p>
		<p>
		Once you have loaded your dataset and experiment information into FSB, you may want to explore it. Use the sliders located at the edge of the four figures in the main GUI to scroll through your image dataset. The upper three panels show sections of the brain, the lower panel shows the timeline of the dataset. For visualization purposes, the fourth figure contains the timeline of the dataset. For every volume, it displays one line which is drawn from the axial section (largest top figure) along the vertical line of the crosshair. Put the crosshair into different positions within the image and see how this influences the displayed information in the lower figure.
		</p>
		<p>
		<h2>
			Preprocessing your data
		</h2>
		</p>
		<h3>
			Select trials
		</h3>
		  If you have loaded a trial matrix, press 
		<a href="buttons_explained.html#All">"All"</a>
		 to select only the volumes that are part of a trial.
		<p>
		 Then press 
		<a href="buttons_explained.html#Keep">"Keep"</a> to keep only those trials and discard the rest of the dataset. You are now left with a concatenated dataset consisting only of trial periods within your experiment.
		<h3>
			Remove artefacts
		</h3>
		<p>
		 Now use the 
		<a href="buttons_explained.html#artrem">"Artefact Removal"</a>
		 slider to detect artefacts. Depending on the slider position, more or less artefacts are going to be labelled. This allows you to compare the results of your visual inspection with your artefact detection threshold setting.  Check the timecourse figure if really all the
		artefacts that you can visually detect are marked. 
		</p>
		 
		<p>
		 If you have selected all the artefacts you wanted to remove, press either the 
		<a href="buttons_explained.html#artrem">"Artefact Removal"</a>
		 button to remove all the faulty volumes from the dataset or the 
		<a href="buttons_explained.html#delete">"Delete"</a>
		 button to remove the trials that contain faulty volumes from the dataset.
		</p>
		 
		<p>
		If you go for the volumes, you will be left with a 'cleaned' dataset which will
		still contain periods of time with useful information and periods of time where
		no useful information is stored. This will make subsequent temporal filtering of the dataset difficult.
		</p>
		 
		
		<h3>Check movement in your dataset</h3>
<p> Now look for <a href="buttons_explained.html#movement">movement</a> in your data. Should your image now appear to move, you may want to try your luck with the 
		<a href="realignment_toolbox.html">realignment toolbox</a>, which was introduced to get rid of this. It offers a couple of relevant algorithms to compensate for movements in the data. 
If you happen to see significant movement, try one of the realignment methods. <a href="buttons_explained.html#Rea3DCOM">3D-Center of Mass</a> usually is reasonably robust, but introduces additional smoothness into the data that you might want to take into account. The SPM algorithms are slower but usually more precise.

<h3>Temporally filter your dataset	</h3>	 

<h3>Normalize your data	</h3>	 
		<a href="buttons_explained.html#normalize">Normalize</a>
		 these to get an even signal over the course of the scan. If there is excessive
		noise in the scans, you might want to use the 
		<a href="buttons_explained.html#denoise">SNR thresholding slider </a>
		to remove it and press the 
		<a href="buttons_explained.html#denoise">"SNR Threshold"</a>
		 button when you are done.

<h3>Correct image intensity 
</h3>
If there is a huge signal intensity gradient over
		the images, you might want to correct the intensity with the 
		<a href="buttons_explained.html#corint">"Correct Intensity"</a>
		 button. 
<h3>Extract the brains</h3>
To get rid of volume space that is not relevant for data analysis,
		select with the Extract Brain slider which part of the volume represents the
		brain, and press "
		<a href="buttons_explained.html#extrbrain">Extract Brain"</a>
		 once you are done. Now you are left with just the volumes that you are
		interested in and just the brain, if you are lucky.
<p>
		  If there is more than you want, you might want to try to use the 
		<a href="buttons_explained.html#lensfilt">"Apply Lens Filter"</a>
		 slider to improve signal in the brain and decrease image intensity around the
		brain, and try the brain extraction again. </p>
		  The brain extraction saves you a lot of time for the statistical
		calculations, already. 
<h3>Crop&Pad to speed up things</h3>
		  If you want to speed up further processing, now press 
		<a href="buttons_explained.html#crop">"Crop"</a>
		, which will remove all the empty space around the brain, and significantly
		reduce the memory footprint of the scans. You are now set for real-time
		statistics:)

<h3>Display a map</h3>
		  Click on 
		<a href="buttons_explained.html#dispmap">"Display Map"</a>
		 to see a (nearly) real time map of your statistics. Default is 
		<a href="buttons_explained.html#model">correlation</a>
		 between your selected predictor and actual signal time course in the brain
		because this is fastest. You have other options, though, if you are patient.
		Select 
		<a href="buttons_explained.html#model">GLM</a>
		 for compatibility with SPM, 
		<a href="buttons_explained.html#model">robust regression</a>
		 if you don't mind that and your data are noisy. This helps you to see which voxels are improbable to have generated a
		signal similar to your predictor by pure coincidence. Select your probability
		levels with the probability slider,  and your minimum cluster size with the 
		<a href="buttons_explained.html#clusthr">Cluster threshold</a>
		 slider.
<h3>Smoothing</h3>
		  You might now want to try different temporal and spatial smoothing kernels to
		improve your signal. Use for this the 
		<a href="buttons_explained.html#tsmooth">"Temporal Smoothing"</a>
		 slider and button and 
		<a href="buttons_explained.html#ssmooth">"Spatial Smoothing"</a>
		 slider and button. If you like what you see, you might want 
		<h3>Calculate the whole map</h3> with the selected statistical method. For this, press the 
		<a href="buttons_explained.html#calmap">Calculate Map</a>
		 button. 
<h3>Save your data</h3>
Now, if you want to save the results of your work for later, either
		press 
		<a href="buttons_explained.html#save">Save</a>
		 and enter a Filename with a .mat extension or followed by an underscore with a .hdr extension. In the
		first case, Sandbox saves your current sandbox struct information, your updated 4D image data, and you can easily open it later. In the
		second case, Sandbox saves your files in their current shape as a series of 3-D
		volumes with .img and .hdr extensions to disk.
	</body>
</html>
